home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / plaf / basic / BasicTreeUI$FocusHandler.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  1.1 KB  |  34 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.Rectangle;
  4. import java.awt.event.FocusEvent;
  5. import java.awt.event.FocusListener;
  6.  
  7. public class BasicTreeUI$FocusHandler implements FocusListener {
  8.    // $FF: synthetic field
  9.    private final BasicTreeUI this$0;
  10.  
  11.    public BasicTreeUI$FocusHandler(BasicTreeUI var1) {
  12.       this.this$0 = var1;
  13.    }
  14.  
  15.    public void focusGained(FocusEvent var1) {
  16.       if (this.this$0.tree != null) {
  17.          Rectangle var2 = this.this$0.getPathBounds(this.this$0.tree, this.this$0.tree.getLeadSelectionPath());
  18.          if (var2 != null) {
  19.             this.this$0.tree.repaint(var2);
  20.          }
  21.  
  22.          var2 = this.this$0.getPathBounds(this.this$0.tree, BasicTreeUI.access$4(this.this$0));
  23.          if (var2 != null) {
  24.             this.this$0.tree.repaint(var2);
  25.          }
  26.       }
  27.  
  28.    }
  29.  
  30.    public void focusLost(FocusEvent var1) {
  31.       this.focusGained(var1);
  32.    }
  33. }
  34.